'use strict';
/*
 * @Author: FanWeiHua
 * @Date: 2020-09-23 12:50:46
 * @LastEditTime: 2021-07-14 09:49:11
 * @LastEditors: Please set LastEditors
 * @Description: 开发时构建
 */
const webpack = require('webpack');
const merge = require('webpack-merge');
const base = require('./webpack.base');
const util = require('./common/util');
/**
 * webpack的自定义配置
 */
const defaultConfig = {
  webpackConfig: JSON.parse(process.env.webpackConfig)
};
// 转换对象的value为JSON_stringify
const config = util.getObj_value_JSON_stringify(defaultConfig);
module.exports = merge(base(), {
  devtool: 'source-map',
  plugins: [new webpack.DefinePlugin(config)]
});
